const a = function (echarts, d, { xe: { commafy, get, pluck } }) {
  const items = get(d, "data.items", []);
  if (!items.length) return {};
  items.sort((a, b) => b.ys - a.ys);
  items.forEach((i) => {
    i.ys = Number(((i.ys || 0) / 10000).toFixed(2));
    i.zc = Number(((i.zc || 0) / 10000).toFixed(2));
  });
  return {
    xAxis: {
      type: "category",
      boundaryGap: true,
      data: pluck(items, "programName"),
    },
    yAxis: [{ type: "value", name: "单位: 万元" }],
    series: [
      {
        name: "支出",
        type: "bar",
        stack: "zc",
        data: pluck(items, "zc"),
        label: { show: true, position: "top" },
      },
      {
        name: "预算",
        type: "bar",
        stack: "ys",
        data: pluck(items, "ys"),
        label: { show: true, position: "top" },
      },
    ],
  };
};
